<!doctype html>
<html lang="en"  xmlns:th="http://www.thymeleaf.org">
 <head>
  <meta charset="UTF-8"></meta>
  <title>登录界面</title>
  <script src="/jquery-1.6.2.min.js"></script>
  <script type="text/javascript">
  
    function submitData(){
    	var username=$("#username").val();
    	var password=$("#password").val();
    	if(username==""){
    		alert("请输入用户名！");
    		return;
    	}
    	if(password==""){
    		alert("请输入密码！");
    		return;
    	}
    	document.getElementById("fm").submit();
    }
  
  	
  </script>
 </head>
 <body>
      <form id="fm" action="/user/login" method="post">
		  <table>
			  <tr>
				  <th colspan="2">9999用户登录</th>
			  </tr>
			  <tr>
				  <td>用户名：</td>
				  <td><input type="text" id="username" name="username"></td>
			  </tr>
			  <tr>
				  <td>密码：</td>
				  <td><input type="password" id="password" name="password"></td>
			  </tr>
			  <tr>
				  <td colspan="2">
					  <input type="button" onclick="submitData()" value="提交">
					  <div th:if="${errorInfo}">
						  <font color="red">用户名或者密码错误!</font>
					  </div>
				  </td>
			  </tr>
		  </table>
	  </form>
 </body>
</html>